<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>修改</title>

    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" type="text/css" media="all" th:href="@{/css/tyle.css}">
    <link rel="stylesheet" type="text/css" media="all" th:href="@{/css/tyle.css}">
    <script th:src="@{/js/jquery-1.9.1.min.js}"></script>
    <style type="text/css">
        body {
            background-color: #ffffff;
            padding: 20px
        }

        .layui-input {
            border-color: #009688;
        }
    </style>
</head>
<body><!-- ctrl + F9  -->

<form class="layui-form layui-form-pane" action="/my/editCampus/result">

    <div class="layui-form-item">
        <label class="layui-form-label">活动名称</label>
        <div class="layui-input-block">
            <input type="text" name="c_name" autocomplete="off" placeholder="请输入" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">担任职务</label>
        <div class="layui-input-block">
            <input type="text" name="c_duty" autocomplete="off" placeholder="请输入" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label" style="margin-top: 20px">活动时间</label>
            <div class="layui-form-mid" style="line-height: 60px;margin-left: 20px;margin-right: 20px">起始</div>
            <div class="layui-input-inline" style="width: 100px">
                <input type="text" name="c_time" id="date0" lay-verify="required" autocomplete="off"
                       class="layui-input">
            </div>
            <div class="layui-form-mid" style="line-height: 60px;margin-left: 20px;margin-right: 20px">到</div>
            <div class="layui-input-inline" style="width: 100px">
                <input type="text" name="c_time_1" id="date1" lay-verify="required" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">活动地点</label>
        <div class="layui-input-block">
            <input type="text" placeholder="选择城市" lay-verify="required" id="place" name="c_site" class="layui-input"/>
        </div>
    </div>
    <!-- 城市 -->
    <div id="in_city" style="display: none"></div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">活动描述</label>
        <div class="layui-input-block">
            <textarea name="c_describe" placeholder="请简练输入" class="layui-textarea"></textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <button class="layui-btn" lay-submit="" lay-filter="demo1">提交</button>
    </div>
</form>


<script th:src="@{/layui/layui.all.js}"></script>
<script th:src="@{/ceshi/cam_ceshi.js}"></script>
<script>
    //由于模块都一次性加载，因此不用执行 layui.use() 来加载对应模块，直接使用即可：
    ;!function () {
        var layer = layui.layer
            , laydate = layui.laydate
            , form = layui.form;
        //日期
        laydate.render({
            elem: '#date1'
        });
        laydate.render({
            elem: '#date0'
        });
        laydate.render({
            elem: '#date2'
        });

        // layer.msg('Hello World');
    }();
</script>
<script type="text/javascript" th:src="@{/js/cityTemplate.js}"></script>
<script type="text/javascript">

    var cityA = $(".city_a_le1 a"); //城市
    var pla = $("#place");  //出发地
    var dest = $("#destination");  //目的地
    // 默认值
    inCity.width = "345";  //城市选择框  宽
    inCity.height = "auto";  //城市选择框  高
    inCity.id = "#in_city";  //城市选择框  父级ID
    inCity.Children = '.city_a_le1';  //城市名box
    // 初始化 城市HTML模板
    $(inCity.id).prepend(inCity._template.join(''));
    inCity.Hot(cityA);

    //城市 导航
    var apay = $(".screen a");

    var placeThis; //当前选择标签
    apay.click(function (obj) {  //城市导航
        inCity.payment($(this));
    })

    inCity.place(pla); //出发地
    inCity.destination(dest);  //目的地
    inCity.cityClick(cityA); //显示赋值城市
</script>
</body>
</html>
